package cn.com.dhcc.app.pub.module.resmgr.vo;

import java.io.Serializable;
import java.util.Date;

import cn.com.dhcc.app.core.annotation.WsdColumn;
import cn.com.dhcc.app.core.annotation.WsdNotDbColumn;
import cn.com.dhcc.app.core.annotation.WsdTable;
import cn.com.dhcc.app.core.base.ModuleFeatureBean;
import cn.com.dhcc.app.pub.core.Table.SYS_BASE_TABLE;
/**
 * 操作
 * @日期：2013-6-6下午7:27:13
 * @作者：乔兵
 * @版权所有：东华软件
 * @版本：1.0
 */
@WsdTable
public class LinkResource extends ModuleFeatureBean implements Serializable {
	private static final long serialVersionUID = 1L;

	public String tableName(){
		return SYS_BASE_TABLE.SYS_BASE_LINK;
	}
	public String schema(){
		return super.schema();
	}
	
	public LinkResource(String id) {
		super();
		this.id = id;
	}

	public LinkResource() {
		super();
	}

	@WsdColumn(isId = true)
	private String id;
	/**
	 * 导航显示
	 */
	private String shortName;
	private String url;
	private String isPublic;
	private String outurl;//是否外链
	@WsdColumn(name="OWNER_URL_PREFIX")
	private String ownerUrlPreFix;
	@WsdColumn(name="OWNER_TYPE")
	private String ownerType;
	private Integer ordNum;
	private Date modified;
	private String muid;
	private String remark;
	private String btnvalue;
	private String hidden;
	private String fordev;
	@WsdNotDbColumn
	private boolean hasAuth;
	@WsdNotDbColumn
	private String extFlag;//扩展属性，可填写任意值
	@WsdNotDbColumn
	private String navigate;

	//所属系统，如：1 外部系统 2外部系统(前缀来自配置文件) 
	public static enum LinkOwnerType {
		OUT_SYS("1","外部系统 (全链接)"),
		OUT_SYS_WITH_PREFIX_CONFIGED("2","外部系统(链接前缀来自配置文件)");
		private String code;
		private String name;
		private LinkOwnerType(String code,String name){
			this.code = code;
			this.name = name;
		}
		public String getCode() {
			return code;
		}
		public String getName() {
			return name;
		}
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getShortName() {
		return shortName;
	}
	public void setShortName(String shortName) {
		this.shortName = shortName;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getIsPublic() {
		return isPublic;
	}
	public void setIsPublic(String isPublic) {
		this.isPublic = isPublic;
	}
	public String getOuturl() {
		return outurl;
	}
	public void setOuturl(String outurl) {
		this.outurl = outurl;
	}
	public String getOwnerUrlPreFix() {
		return ownerUrlPreFix;
	}
	public void setOwnerUrlPreFix(String ownerUrlPreFix) {
		this.ownerUrlPreFix = ownerUrlPreFix;
	}
	public String getOwnerType() {
		return ownerType;
	}
	public void setOwnerType(String ownerType) {
		this.ownerType = ownerType;
	}
	public Integer getOrdNum() {
		return ordNum;
	}
	public void setOrdNum(Integer ordNum) {
		this.ordNum = ordNum;
	}
	public Date getModified() {
		return modified;
	}
	public void setModified(Date modified) {
		this.modified = modified;
	}
	public String getMuid() {
		return muid;
	}
	public void setMuid(String muid) {
		this.muid = muid;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getBtnvalue() {
		return btnvalue;
	}
	public void setBtnvalue(String btnvalue) {
		this.btnvalue = btnvalue;
	}
	public String getHidden() {
		return hidden;
	}
	public void setHidden(String hidden) {
		this.hidden = hidden;
	}
	public boolean isHasAuth() {
		return hasAuth;
	}
	public void setHasAuth(boolean hasAuth) {
		this.hasAuth = hasAuth;
	}
	public String getExtFlag() {
		return extFlag;
	}
	public void setExtFlag(String extFlag) {
		this.extFlag = extFlag;
	}
	
	public String getFordev() {
		return fordev;
	}
	public void setFordev(String fordev) {
		this.fordev = fordev;
	}
	public String getNavigate() {
		return navigate;
	}
	public void setNavigate(String navigate) {
		this.navigate = navigate;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LinkResource other = (LinkResource) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
	

}

